#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n, m, q, u, v, t;

queue<ll> Q[3];

/**
 * Pick an earthworm at time `t`
 * @param t the time point of the pick
 * @return the length of the longest worm
 */
ll pick(int t) {
  ll x = -1;
  int idx = -1;
  for (int i = 0; i < 3; ++i) {
    if (!Q[i].empty()) {
      ll a = Q[i].front() + t * q;
      if (a > x) {
        x = a;
        idx = i;
      }
    }
  }
  Q[idx].pop();
  return x;
}
const int N = 1e7 + 10;
int a[N];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m >> q >> u >> v >> t;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a, a + n, greater<>());
  for (int i = 0; i < n; ++i) Q[0].push(a[i]);
  for (int i = 1; i <= m; ++i) {
    ll x = pick(i - 1);
    if (i % t == 0) cout << x << ' ';
    // Cu
    ll a = x * u / v;
    ll b = x - a;
    Q[1].push(a - i * q);  // 把蚯蚓缩回去，队列里存的是 t=0 时刻的长度
    Q[2].push(b - i * q);
  }
  cout << endl;
  for (int i = 1; i <= n + m; ++i) {
    ll x = pick(m);
    if (i % t == 0) cout << x << ' ';
  }
  cout << endl;
}
